Other Extensions
The following extensions are available globally.
-
Declaration
Swift
public extension Array where Element: LaunchArgumentValue
-
Declaration
Swift
extension Dictionary
-
Default implementation LaunchEnvironmentValue for string. Usage example:
public struct StringLaunchEnvironment: LaunchEnvironmentProtocol { public typealias Value = String public let value: Value public var launchEnvironments: [String : String]? { return [uniqueIdentifier: value] } public init(value: Value) { self.value = value } }See moreNote
internalinitializer would be generated automatically but it would not fulfill requirement ofpublicprotocol.Declaration
Swift
extension String: LaunchEnvironmentValue
-
Provides default implementation for any
RawRepresentabletype to represent a launch environment in a few simple steps.Example:
enum LimitedOptionsEnvironment: String, LaunchEnvironmentWithSingleValue { case one case two var key: String { return "LimitedOptionsEnvironment" } }Usage:
See morelet app = XCUIApplication() TestLauncher(options: [ LimitedOptionsEnvironment.one ]).configure(app).launch()Declaration
Swift
public extension RawRepresentable where Self: LaunchEnvironmentWithSingleValue
Other Extensions Reference